#include <stdio.h>
#include <string.h>
#include <math.h>

int nL=0, nN=0;

int statistics(char *s)
{
    int i,j;
    for(i=0,j=0;*s!='\0';*s++)
    {
    	if('a'<=s[i]&&'z'>=s[i]||'A'<=s[i]&&'Z'>=s[i])
    	nL++;
    	if('0'<=s[i]&&'9'>=s[i])
    	nN++;
    	if(' '==s[i])
    	j++;
	}
	return j;
}

int main()
{
    char s[81];
    int nS;
    gets(s);
    nS = statistics(s);

    printf("%d %d %d\n", nL, nN, nS);
    return 0;
}

